#ifndef _CALIBRATION_H
#define _CALIBRATION_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

	#define CALIBRATION_ADDR 0x800FC00//63KB
	#define AF_POS_TO_FLASH_ADDR 0x800F800//62KB
	#define FLASH_SECTOR_SIZE   1024

	extern void PosPhyGainSet(int16_t PosPhyGainP, int16_t PosPhyGainN);
    extern void apRingSet(uint16_t ap_max, uint16_t ap_min,uint16_t ap_auto);
    extern void afRingSet(uint16_t af_near, uint16_t af_inf,uint16_t af_over);
    extern void apRingAllSet(uint16_t *buf,uint16_t len);
    extern void afRingAllSet(uint16_t *buf,uint16_t len);
     
	extern int16_t PosPIGet(void);
	extern int16_t PosPhyGainPGet(void);
	extern int16_t PosPhyGainNGet(void);
    extern int16_t ApRingMaxGet(void);
    extern int16_t ApRingMinGet(void);
    extern int16_t ApRingAutoGet(void);
    extern int16_t AfRingNearGet(void);
    extern int16_t AfRingInfGet(void);
    extern int16_t AfRingOverGet(void);
    extern uint16_t apRingALLGetLen(void);
    extern uint16_t* apRingALLGet(void);
    extern uint16_t afRingALLGetLen(void);
    extern uint16_t* afRingALLGet(void);
   

#ifdef __cplusplus
}
#endif

#endif
